<template>
  <div>
    <div class="row">
      <Banner/>
    </div>
    <div class="row">
      <div class="col-xs-2 col-xs-offset-2">
        <div class="list-group">
          <!-- (1) router-link最底层其实也是a标签，to告诉用哪个路由 -->
          <router-link class="list-group-item" active-class="active" to="about">About</router-link>
          <router-link class="list-group-item" active-class="active" to="home">Home</router-link>
        </div>
      </div>
      <div class="col-xs-6">
        <div class="panel">
          <div class="panel-body">
            <!-- (2) 跳转路由时对应组件放的位置 -->
            <router-view></router-view>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Banner from './components/Banner.vue'

export default {
  name: "App",
  /**
   * (3) 像Banner这种直接注册就放在模板的叫 一般组件
   *     而通过路由跳转的对应组件叫做 路由组件，一般把路由组件放在pages来和components
   *     文件夹进行区分
   * */ 
  components:{Banner}
};
</script>
